﻿using Pay.DTO;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.IService
{
    public interface IAdvertisementService
    {
        /// <summary>
        /// 广告列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<advertisement_dto> GetAdvertisements(AdvertisementQuery query);

        /// <summary>
        /// 获得广告
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        advertisement_dto GetAdvertisement(long id);

        /// <summary>
        /// 新增广告
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int AddAdvertisement(advertisement_dto dto);

        /// <summary>
        /// 更新广告
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int UpdateAdvertisement(advertisement_dto dto);

        /// <summary>
        /// 删除广告
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteAdvertisement(long id);

        /// <summary>
        /// 修改广告状态
        /// </summary>
        /// <param name="id"></param>
        /// <param name="status"></param>
        /// <returns></returns>
        int UpdateAdvertisementStatus(long id, int status);


        #region API接口
        /// <summary>
        /// APP端根据位置类型获得广告列表
        /// </summary>
        /// <param name="positionType"></param>
        /// <returns></returns>
        List<ad_dto> AppGetAdvertisementList(merch_advertisement_query_type queryType);
        /// <summary>
        /// App端根据（多个）位置类型获得广告列表
        /// </summary>
        /// <param name="types"></param>
        /// <returns></returns>
        List<ad_type_dto> AppGetAdListByTypes(List<int> types);
        /// <summary>
        /// APP端获取广告详情（用于记录点击数）
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        advertisement_dto AppGetAdvertisement(long id);
        #endregion
    }
}
